package com.tanhua.manage.controller;

import com.tanhua.manage.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manage/messages/comments")
public class CommentController {


    @Autowired
    private CommentService commentService;

    //评论列表翻页
    @GetMapping
    public ResponseEntity<Object> comments(@RequestParam(defaultValue = "1")Integer page, @RequestParam(defaultValue = "10")Integer pagesize, @RequestParam("messageID") String publishId){
        return commentService.queryByPage(page,pagesize,publishId);
    }
}
